﻿using System;
using Volo.Abp.Domain.Entities.Auditing;

namespace Joy.Erp.BasicArchives.Core
{
    public class DocumentLineAggregateRoot<TKey> : AuditedAggregateRoot<TKey>, IDocumentLineAggregateRoot<TKey>
    {
        /// <summary>
        /// 设置id
        /// </summary>
        /// <param name="id"></param>
        public virtual void SetId(TKey id) => Id = id;

        /// <summary>
        /// 单据
        /// </summary>
        public Guid DocumentId { get; set; }

        /// <summary>
        /// 行号
        /// </summary>
        public int LineNo { get; set; }

        /// <summary>
        /// 来源类型
        /// </summary>
        public string SourceType { get; set; }

        /// <summary>
        /// 来源主键
        /// </summary>
        public string SourceKey { get; set; }

        /// <summary>
        /// 来源时间
        /// </summary>
        public virtual DateTime? SourceCreatedOn { get; set; }
    }

    public class DocumentLineAggregateRoot : DocumentLineAggregateRoot<Guid>, IDocumentLineAggregateRoot
    {
    }
}
